package cn.cxj.order.domain;

import cn.cxj.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品实体类
 * @author 陈鑫杰
 */
@Data
public class Product extends BaseDomain {
    private String name;
    private String resources;
    private BigDecimal saleprice;
    private Date offsaletime = new Date();
    private Date onsaletime = new Date();
    private Long state;
    private BigDecimal costprice;
    private Date createtime = new Date();
    private Long salecount = 0L;
    
    private ProductDetail productDetail;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getOffsaletime() {
        return offsaletime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getOnsaletime() {
        return onsaletime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getCreatetime() {
        return createtime;
    }
}
